package com.simple.proxy.mybatis.test;

import com.simple.proxy.mybatis.annotations.Transaction;
import com.simple.proxy.mybatis.proxy.MapperProxyFactory;

public class UserInfoService {

    private UserInfoMapper mapper = MapperProxyFactory.getMapper(UserInfoMapper.class);

    public UserInfo getUserInfo(int id){
        return mapper.getUserInfo(id);
    }


    @Transaction
    public int updateUserInfo(String name,int id){
        int result = mapper.updateUserInfo(name, id);
        int i = 5/0;
        return result;
    }
}
